using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class UpgradeRegen : UpgradeButton {

	protected override int CostForLevel() {
		return (int)(100 * Mathf.Pow(2, gm.regenerationRate*5f));
	}

	override public void Clicked() {
		if(gm.score < CostForLevel())
			return;

		gm.score -= CostForLevel();

		gm.regenerationRate += 0.1f;
	}

	override protected string UpgradeName() {
		return "Increase regen of all player units to "+ (gm.regenerationRate*10f + 1f).ToString("f1") +" per 10secs.";
	}

}
